{layout name="index/layout" /}        <!--content-->
<div class="center">
    <div class="info">
        <div class="user">
            <div class="user_img">
                <img src="/static/images/center/people.png" alt="user"/>
            </div>
            <div class="user_info">
                <h3>个人信息</h3>
                <p class="user_info_welcome">您好，{$Think.session.name}。欢迎回来</p>
                <p>您上一次登录时间：{neq name="loginTime" value="0"}{$loginTime|date="Y-m-d
                    H:i:s",###}{else/}这是您首次登录系统{/neq}</p>
                <p>您有<a href="msg.html">{$count}</a>条未读消息</p>
            </div>
        </div>
        <div class="point">
            <div class="point_img">
                <img src="/static/images/center/shop.png" alt="shop"/>
            </div>
            <div class="point_info">
                <h3>积分信息</h3>
                <p>消费积分：{if $point neq false}{$point.AvailablePoint}{else}0{/if}</p>
                <p>转介绍积分：{if $point neq false}{$point.IntroducerPoint}{else}0{/if}</p>
                <p>合计积分：{if $point neq false}{$point.AvailablePoint + $point.IntroducerPoint}{else}0{/if}</p>
                <p>已兑换积分：{if $point neq false}{$point.used}{else}0{/if}</p>
            </div>
        </div>
    </div>
    <div class="clear"></div>
    <div class="query">
        <h5>消费信息</h5>
        <div class="table">
            <table>
                <tr>
                    <th>消费时间</th>
                    <th>消费商品</th>
                    <th>消费金额</th>
                    <th>消费积分</th>
                    <th>门店</th>
                    <th>备注</th>
                </tr>
                {if $sells neq false}
                {foreach $sells as $sell}
                <tr class="table_query">
                    <td>{$sell.CreateDate|substr=0,-3}</td>
                    <td>
                        <button>点击展开</button>
                    </td>
                    <td>{$sell.TotalMoney}</td>
                    <td>{$sell.Point|round}</td>
                    <td>{$sell.Department}</td>
                    <td>{$sell.Remark}</td>
                </tr>
                <tr class="productID">
                    <td colspan="6">
                        <table class="product">
                            <tr>
                                <th>商品名</th>
                                <th>单价</th>
                                <th>折扣</th>
                                <th>数量</th>
                                <th>合计</th>
                                <th>备注</th>
                            </tr>
                            {foreach $sell.product as $goods}
                            <tr class="table_query">
                                <td>{$goods.Product}</td>
                                <td>{$goods.Price}</td>
                                <td>{$goods.Discount|round}%</td>
                                <td>{$goods.Number|round}</td>
                                <td>{$goods.Total}</td>
                                <td>{$goods.Remark}</td>
                            </tr>
                            {/foreach}
                        </table>
                    </td>
                </tr>
                {/foreach}
                {else}
                <tr>
                    <td colspan="6" class="table_not">没有查到消费信息</td>
                </tr>
                {/if}
                <tr>
                    <td colspan="6" class="table_link"><a href="sell.html">更多消费信息>></a></td>
                </tr>
            </table>
        </div>
        <h5>积分兑换信息</h5>
        <div class="table">
            <table>
                <tr>
                    <th>会员卡号</th>
                    <th>会员姓名</th>
                    <th>兑换商品</th>
                    <th>消耗积分</th>
                    <th>兑换时间</th>
                    <th>备注</th>
                </tr>
                {if $exchanges neq false}
                {foreach $exchanges as $exchange}
                <tr class="table_query">
                    <td>{$exchange.Card}</td>
                    <td>{$exchange.Member}</td>
                    <td>
                        <button>点击展开</button>
                    </td>
                    <td>{$exchange.Point|round}</td>
                    <td>{$exchange.CreateDate|substr=0,-3}</td>
                    <td>{$exchange.Remark}</td>
                </tr>
                <tr class="productID">
                    <td colspan="6">
                        <table class="product">
                            <tr>
                                <th>商品名</th>
                                <th>单价</th>
                                <th>会员价</th>
                                <th>兑换积分</th>
                                <th>数量</th>
                                <th>总兑换积分</th>
                                <th>备注</th>
                            </tr>
                            {foreach $exchange.product as $product}
                            <tr class="table_query">
                                <td>{$product.Product}</td>
                                <td>{$product.Price}</td>
                                <td>{$product.MemberPrice}</td>
                                <td>{$product.Point|round}</td>
                                <td>{$product.Number|round}</td>
                                <td>{$product.Total|round}</td>
                                <td>{$product.Remark}</td>
                            </tr>
                            {/foreach}
                        </table>
                    </td>
                </tr>
                {/foreach}
                {else}
                <tr>
                    <td colspan="6" class="table_not">没有查到积分兑换信息</td>
                </tr>
                {/if}
                <tr>
                    <td colspan="6" class="table_link"><a href="point.html">更多积分兑换信息>></a></td>
                </tr>
            </table>
        </div>
        <h5>下级消费信息</h5>
        <div class="table">
            <table>
                <tr>
                    <th>会员卡号</th>
                    <th>会员姓名</th>
                    <th>级别</th>
                    <th>介绍人</th>
                    <th>消费时间</th>
                    <th>消费金额</th>
                    <th>消费积分</th>
                    <th>奖励积分</th>
                    <th>备注</th>
                </tr>
                {if $introducer neq false}
                {foreach $introducer as $sale}
                <tr class="table_query">
                    <td>{$sale.Card}</td>
                    <td>{$sale.Member}</td>
                    <td>{$sale.Level-$offset.Level}</td>
                    <td>{$sale.Introducer}</td>
                    <td>{$sale.CreateDate|substr=0,-3}</td>
                    {if $sale.SellID eq null}
                    <td>新介绍奖励</td>
                    <td>无</td>
                    {else}
                    <td>{$sale.Income}</td>
                    <td>{$sale.spoint|round}</td>
                    {/if}
                    <td>{$sale.Point|round}</td>
                    <td>{$sale.Remark}</td>
                </tr>
                {/foreach}
                {else}
                <tr>
                    <td colspan="9" class="table_not">没有查到下级消费信息</td>
                    {/if}
                </tr>
                <tr>
                    <td colspan="9" class="table_link"><a href="sale.html">更多下级消费信息>></a></td>
                </tr>
            </table>
        </div>
        <h5>站内消息</h5>
        <div class="table">
            <table>
                <tr>
                    <th>发送人</th>
                    <th>标题</th>
                    <th>内容预览</th>
                    <th>发送时间</th>
                    <th>操作</th>
                </tr>
                {if $messages neq false}
                {foreach $messages as $msg}
                <tr class="table_query">
                    <td>{$msg.admin_id}</td>
                    <td>{$msg.title}</td>
                    <td>{$msg.content|substr=0,30}
                        <button style="float: right;height: 28px;">点击展开</button>
                    </td>
                    <td>{$msg.sendtime|date='Y-m-d H:i:s',###}</td>
                    <td width="170px">
                        {if $status eq 1}
                        <form action="msg.html" method="post" style="display: inline">
                            <input type="hidden" name="update" value="{$msg.id}">
                            <input class="button" type="submit" value="设为已读">
                        </form>
                        {else}
                        <form action="#" style="display: inline">
                            <input type="hidden" name="update" value="{$msg.id}">
                            <input class="button" type="submit" value="待开发">
                        </form>
                        {/if}
                        <form action="msg.html" method="post" style="display: inline">
                            <input type="hidden" name="delete" value="{$msg.id}">
                            <input class="button" type="submit" value="删除">
                        </form>
                    </td>
                </tr>
                <tr class="productID">
                    <td colspan="6">
                        <table class="product">
                            <tr>
                                <th>详细内容</th>
                            </tr>
                            <tr class="table_query">
                                <td>{$msg.content}</td>
                            </tr>
                        </table>
                    </td>
                </tr>
                {/foreach}
                {else}
                <tr>
                    <td colspan="5" class="table_not">没有查到站内消息</td>
                </tr>
                {/if}
                <tr>
                    <td colspan="5" class="table_link"><a href="msg.html">更多站内消息>></a></td>
                </tr>
            </table>
        </div>
    </div>
</div>
<div class="clear"></div>
